create_csr_matrix Function

public function create_csr_matrix(m, n, rows, cols, vals, err) result(rst)

Creates a CSR matrix from the input data.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: m

The number of rows in the matrix.

integer(kind=int32), intent(in) :: n

The number of columns in the matrix.

integer(kind=int32), intent(in), dimension(:) :: rows

The row indices.

integer(kind=int32), intent(in), dimension(:) :: cols

The column indices.

real(kind=real64), intent(in), dimension(:) :: vals

The values.

class(errors), intent(inout), optional, target :: err

The error object to be updated.

Return Value type(csr_matrix)

The CSR matrix.